import request  from "@/utils/request";

import type {categoty1List} from "./modles/categotyModel"


enum Api {
  categoty1 = "/admin/product/getCategory1",
  categoty2 = "/admin/product/getCategory2",
  categoty3 = "/admin/product/getCategory3",
}

// 一级请求函数
 export const getCategoty1Api = () =>{
    return request.get<any, categoty1List>(Api.categoty1);
 }

//  二级请求函数
export const getCategory2Api = (id:number) =>{
    return request.get<any, categoty1List>(`${Api.categoty2}/${id}`);
}

// 三级请求数据
export const getCategory3Api = (id: number) => {
    return request.get<any, categoty1List>(`${Api.categoty3}/${id}`);
};